<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
<!--
body {
	margin-left: 3px;
	margin-top: 0px;
	margin-right: 3px;
	margin-bottom: 0px;
}
.STYLE1 {
	color: #e1e2e3;
	font-size: 12px;
}
.STYLE6 {color: #000000; font-size: 12; }
.STYLE10 {color: #000000; font-size: 12px; }
.STYLE19 {
	color: #344b50;
	font-size: 12px;
}
.STYLE21 {
	font-size: 12px;
	color: #3b6375;
}
.STYLE22 {
	font-size: 12px;
	color: #295568;
}
*{font-family:Tahoma, Arial, Helvetica, Sans-serif,"宋体";}
table{
	width:85%;
	margin:0px auto;
	font:Georgia 11px;
	font-size:12px;
	color:#333333;
	text-align:center;
	border-collapse:collapse;/*细线表格代码*/
}
table td{
	border:1px solid #999;/*细线表格线条颜色*/
	height:22px;
}
caption{text-align:center;font-size:12px;font-weight:bold;margin:0 auto;}
tr.t1 td {background-color:#fff;}
tr.t2 td {background-color:#eee;}
tr.t3 td {background-color:#ccc;}
th,tfoot tr td{font-weight:bold;text-align:center;background:#c5c5c5;}
th{line-height:30px;height:30px;}
tfoot tr td{background:#fff;line-height:26px;height:26px; border:1px solid #999;}
thead{border:1px solid #999;}
thead tr td{text-align:center;}
a{
	text-decoration:none;
	}
	img{
		border:0px;}
-->
</style>
<script src="../admin_core/templates/admin/js/list.js"></script>
<script type="text/javascript"><!--
function selectPage(obj)
{

	var value = obj.value;
	document.location.href="controlXs.php?action=#{$action}#&page="+value+"&countPage=#{$countPage}#&count=#{$count}#&wt_id=#{$wt_id}#&zy_name=#{$zy_name}#&xs_id=#{$xs_id}#&ls_id=#{$ls_id}#&bj_id=#{$bj_id}#&zy_sate=#{$zy_sate}#&tj_date=#{$tj_date}#&start_time=#{$start_time}#&end_time=#{$end_time}#";
	}
		function readHWDetails(hwId)
		{
			window.open('../readHW.php?hwId='+hwId,'作业信息' ,'height=500, width=900, top=0,left=0, toolbar=no, menubar=no, scrollbars=yes, resizable=no,location=no, status=no');
			}
						function checkTeacherDetail(lsId)
	{
		window.open('../readTeacherDetail.php?lsId='+lsId,'老师信息' ,'height=500, width=900, top=0,left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no');
		}
		function checkSubmitDetail(hwId)
	{
		window.open('../submitHW.php?hwId='+hwId,'提交信息' ,'height=500, width=900, top=0,left=0, toolbar=no, menubar=no, scrollbars=yes, resizable=no,location=no, status=no');
		}
		function getStudentList(bjId)
	{
		window.open('../getStudentListByBJ.php?bjId='+bjId,'班级详细信息' ,'height=500, width=900, top=0,left=0, toolbar=no, menubar=no, scrollbars=yes, resizable=no,location=no, status=no');
		}
		function readZy(zyId)
		{
			window.open('../readZY.php?zyId='+zyId,'查看信息' ,'height=500, width=900, top=0,left=0, toolbar=no, menubar=no, scrollbars=yes, resizable=no,location=no, status=no');
			}
		var xmlHttp;
	function setXmlHttpRequest()
{
	if(window.ActiveXObject)
	{
		xmlHttp = new ActiveXObject('Microsoft.XMLHTTP');
		}
		else if(window.XMLHttpRequest)
		{
			xmlHttp = new XMLHttpRequest();
			}
	}
	
	function ajaxFun(url,funName)
	{
		setXmlHttpRequest();
		url = encodeURI(url);
		xmlHttp.open("GET",url,true);
		xmlHttp.onreadystatechange = funName;
		xmlHttp.send(null);
		}
		
	function getLs()
			{
				var xyId = document.getElementById('xyId').value;
				 document.getElementById('wtSpan').innerHTML = "<select name='wtId' id='wtId' style='width:140px; height:20px; color:#09C; border:#999 1px solid;'><option value='none'>设定搜索的作业</option>";
				if(xyId!="none")
					{
				var url = "controlXs.php?action=getLs&xyId="+xyId+"&type=zy";
				ajaxFun(url,setLs);
			}
			else
			{
				 document.getElementById('lsSelect').innerHTML = "<select name='lsId' id='lsId' style='width:140px; height:20px; color:#09C; border:#999 1px solid;' onchange='getWt()'><option value='none'>设定搜索的老师</option>";
				}
			}
				function setLs()
				{
				if(xmlHttp.readyState == 4)
				{
					if(xmlHttp.status == 200)
					{
						document.getElementById('lsSelect').innerHTML=xmlHttp.responseText;;
						}
					}		
					}
					function getWt()
			{
				var lsId = document.getElementById('lsId').value;
				if(lsId!="none")
					{
				var url = "controlXs.php?action=getWt&lsId="+lsId;
				ajaxFun(url,setWt);
			}else
			{
				  document.getElementById('wtSpan').innerHTML = "<select name='wtId' id='wtId' style='width:140px; height:20px; color:#09C; border:#999 1px solid;'><option value='none'>设定搜索的作业</option>";
				}	
			}
				function setWt()
				{
				if(xmlHttp.readyState == 4)
				{
					if(xmlHttp.status == 200)
					{
						document.getElementById('wtSpan').innerHTML=xmlHttp.responseText;;
						
						}
					}		
					}
		function search()
		{
			var wtId = document.getElementById('wtId').value;
			var searchtype = document.getElementById('searchtype').value;
			var start_time = document.getElementById('start_time').value;
			var end_time  = document.getElementById('end_time').value;
			var zy_name = document.getElementById('zy_name').value;
			var lsId = document.getElementById('lsId').value;
					if(wtId=='none')
					{
						wtId=0;
						}
						if(searchtype==1)
						{
							if(start_time=="")
							{
								alert("请选择一个时间上限！");
								document.getElementById('start_time').focus();
								return ;
								}else if(end_time =="")
								{
									alert("请选择一个时间下限！");
								document.getElementById('end_time').focus();
								return ;
									}
							}
							else 
							{
								searchtype=0;
								start_time=0;
								end_time=0;
								}
								if(zy_name=="")
								{
									zy_name="null";
									}
									if(lsId=='none')
									{
										lsId=0;
										}
								
			document.location.href="controlXs.php?action=#{$action}#&ls_id="+lsId+"&wt_id="+wtId+"&zy_name="+zy_name+"&zy_sate=#{$zy_sate}#&tj_date="+searchtype+"&start_time="+start_time+"&end_time="+end_time;
			}
		
--></script>
<script type="text/javascript" src="date/WdatePicker.js"></script>
</head>

<body style="text-align:center;" >
<center>
<br />
<fieldset style="width:1110px;">
<legend><span style="color:#000; font-size:14px; font-weight:bold;"><img src="images/search_16x16.gif" width="16" height="16" />&nbsp;搜索我#{if $action=='getUnread'}#还未审核#{else if $action == 'getPassed'}#的审核已通过#{else}#需重做#{/if}#的作业
</span></legend>
<span style="font-size:12px; font-weight:bold;">
<span style="float:left; margin-left:50px;">
搜索条件：
<select name="xyId" id="xyId" style="width:150px; height:20px; color:#09C; border:#999 1px solid;"  onchange="getLs()">
  <option value="none">设定搜索的学院/部门</option>
  
#{foreach from=$xyList item=xy}#

  <option value="#{$xy->getXy_id()}#">#{$xy->getXy_name()}#</option>
  
#{/foreach}#

</select>
<font color="#000000" style="font-weight:bolder;">--></font>
<span id="lsSelect">
<select name="lsId" id="lsId" style="width:140px; height:20px; color:#09C; border:#999 1px solid;" onchange="getWt()">
<option value="none">设定搜索的老师</option>
</select>
</span>
<font color="#000000" style="font-weight:bolder;">--></font>
<span id="wtSpan">
<select name="wtId" id="wtId" style="width:140px; height:20px; color:#09C; border:#999 1px solid; ">
<option value="none">设定搜索的作业</option>
</select>
</span>
</span>
<div style=" clear:both; height:5px;">
</div>
<span style="float:left; margin-left:50px;">
 设定搜索作业的提交时间： <select name="searchtype" id="searchtype" style="width:140px; height:20px; color:#09C; border:#999 1px solid;" onchange="if(this.value==1){document.getElementById('start_time').focus();}">
    <option value="0" > 常规搜索 </option>
    <option value="1" >设定作业提交时间</option>
  </select>
时间上限：<input  type="text" name="start_time" id="start_time" readonly="readonly"  class="Wdate"onfocus="var after=$dp.$('end_time');WdatePicker({onpicked:function(){after.focus();},maxDate:'#F{$dp.$D(\'end_time\')}'})"
 style="width:120px; height:20px; color:#09C;" />
 时间下限：
 <input  type="text" name="end_time" id="end_time" readonly="readonly"  class="Wdate" onFocus="WdatePicker({minDate:'#F{$dp.$D(\'start_time\')}'})" style="width:120px; height:20px; color:#09C;" >
 </span>
 <div style="clear:both; height:10px;">
 </div>
<span style="float:left; margin-left:50px;">
请输入作业名或者作业名包含的关键词：
<input  type="text" name="zy_name" id="zy_name" 
 style="width:180px; height:20px; color:#09C; border:#999 1px solid;" />&nbsp;&nbsp;
 <input type="button" value=" 搜 索 " onclick="search()" style="width:80px; height:25px;" />
 </span>

</span>
</fieldset>
<div style="clear:both; height:10px;">
</div>
<fieldset style="width:1110px;">
<legend><img src="images/311.gif"/>&nbsp;<span style="color:#333; font-size:15px; font-weight:bold;">我#{if $action=='getUnread'}#还未审核#{else if $action == 'getPassed'}#审核已通过#{else}#需重做#{/if}#的作业列表</span></legend>
<form id="selectForm" action="controlLs.php?action=deleteHW" method="post">


<table width="100%">

  <thead>
    <tr>
     
      <th >作业标题</th>
      
      <th width="15%">提交时间</th>
      <th width="15%">提交给的老师</th>
      <th width="12%">作业状态</th>
      
       #{if $action =='getUnPassed'}#
       
        <th width="25%" >操作</th>
       #{else}#
        <th width="5%" >分数</th>
       <th width="25%" >操作</th>
         #{/if}#
    </tr>
  </thead>

#{if $count==0}#
<tr>
<td colspan="#{if $action =='getUnPassed'}#5#{else}#6#{/if}#" align="center" style="text-align:center; border: #999 1px solid;">
暂无数据！
</td>
</tr>
#{else}#
    #{foreach from=$list item=zy}#
      <tr onmousemove="changeBackColor(this)" onmouseout="removeBackColor(this)">
     
      <td align="left" style="cursor:pointer; padding-left:5px;" onclick="readHWDetails(#{$zy->getWt()->getWt_id()}#)" title="点击查看详细信息" >#{$zy->getZy_name()|truncate:30:"...."}#</td>
      
      <td width="15%" align="center">#{$zy->getTj_date()|date_format:'%Y-%m-%d'}#</td>
       <td width="15%" align="left" style="padding-left:5px; cursor:pointer;" onclick="checkTeacherDetail(#{$zy->getLs()->getLs_id()}#)" title="查看老师详细信息">#{$zy->getLs()->getLs_name()}#</td>
      <td width="10%" align="center" >#{if $zy->getZy_sate()==0}#
      未审核
      #{else if $zy->getZy_sate()==1}#
      已审核通过
      #{else}#
      审核未通过
      #{/if}#
      </td>
      
       #{if $action =='getUnPassed'}#
     <td width="25%">
       【<img src="images/anchor_(edit)_16x16.gif" width="14" height="14" />&nbsp;<a href="../submitHomework.php?hwId=#{$zy->getWt()->getWt_id()}#&type=#{$action}#"  style="color:green;" title="提交该作业">提交该作业</a>】【<a href="#"  onclick="readZy(#{$zy->getZy_id()}#)" title="获取详细信息" ><img src="images/view_16x16.gif" title="获取详细信息"  width="14" height="14"/>&nbsp;查看该作业</a>】
       </td>
       #{else}#
         <td width="5%">
       #{$zy->getZy_fs()}#分
       </td>
       <td width="25%">
【<a href="#" onclick="readZy(#{$zy->getZy_id()}#)" title="获取详细信息" ><img src="images/view_16x16.gif" title="获取详细信息"  width="14" height="14"/>&nbsp;查看老师审核情况</a>】
       </td>
       
            #{/if}#

      </tr>
 #{/foreach}#
#{/if}#
  <tr>
  <td colspan="
   #{if $action =='getUnPassed'}#5#{else}#6#{/if}#" align="right" style="text-align:right; border: #999 1px solid;">
  共有#{$count}#条记录 总共有#{$countPage}#页 当前为#{$start}#-#{$end}#条 在第#{$nowPage}#页
  #{if $nowPage==1}#
 上一页
  #{else}#
  <a href="controlXs.php?action=#{$action}#&page=#{$nowPage-1}#&countPage=#{$countPage}#&count=#{$count}#&wt_id=#{$wt_id}#&zy_name=#{$zy_name}#&xs_id=#{$xs_id}#&ls_id=#{$ls_id}#&bj_id=#{$bj_id}#&zy_sate=#{$zy_sate}#&tj_date=#{$tj_date}#&start_time=#{$start_time}#&end_time=#{$end_time}#">上一页</a>
  #{/if}#

  #{if $countPage>$nowPage}#
   <a href="controlXs.php?action=#{$action}#&page=#{$nowPage+1}#&countPage=#{$countPage}#&count=#{$count}#&wt_id=#{$wt_id}#&zy_name=#{$zy_name}#&xs_id=#{$xs_id}#&ls_id=#{$ls_id}#&bj_id=#{$bj_id}#&zy_sate=#{$zy_sate}#&tj_date=#{$tj_date}#&start_time=#{$start_time}#&end_time=#{$end_time}#"> 下一页</a>
  #{else}#
  下一页
  #{/if}#
  跳至<select onchange="selectPage(this)">
  #{section loop=$countPage name=a}#
<option value="#{$smarty.section.a.iteration}#" #{if $smarty.section.a.iteration==$nowPage}# selected="selected"#{/if}#>#{$smarty.section.a.iteration}#页</option>
#{/section}#
</select>
  &nbsp;&nbsp;
  
  </td>
  </tr>
 
  
</table>
</form>
</fieldset>
</center>
</body>
</html>
